
 
 
// <Template>
//   <SolutionTemplate></SolutionTemplate>
//   <Version>20110104.1</Version>
//   <Update></Update>
// </Template>


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MvcSiteMapProvider.Extensibility;
using SFS.SampleApp.Web.Mvc.Resources;

namespace SFS.SampleApp.Web.Mvc
{
    public partial class DynamicNodeProvider : DynamicNodeProviderBase
    {
        partial void OnCreatingNodes(object sender, ref List<DynamicNode> nodes);
        partial void OnCreatedNodes(object sender, ref List<DynamicNode> nodes);
   
        public override IEnumerable<DynamicNode> GetDynamicNodeCollection()
        {
            List<DynamicNode> nodes = new List<DynamicNode>();
            DynamicNode node = null;
            
			node = new DynamicNode();
            node.Title = ModuleResources.MODULE_NAME;
            node.Controller = "Navigation";
            node.Area = "";
            node.Action = "Index";
            node.Key = "SFSSampleApp";
			node.RouteValues.Add("id", node.Key);
 			node.Attributes.Add("moduleKey", "SFSSampleApp");
            node.Attributes.Add("permissionKey", "r");            
            nodes.Add(node);


            node = new DynamicNode();
            node.Title = ModuleResources.CATALOGS;
            node.Controller = "Navigation";
            node.Area = "";
            node.Action = "Index";
            node.Key = "SFSSampleApp_Catalogs";
			node.RouteValues.Add("id", node.Key);
			node.ParentKey = "SFSSampleApp";
            nodes.Add(node);
			
			
            node = new DynamicNode();
            node.Title = ModuleResources.CATALOGS_OTHERS;
            node.Controller = "Navigation";
            node.Area = "";
            node.Action = "Index";
            node.Key = "SFSSampleApp_Catalogs_Others";
			node.RouteValues.Add("id", node.Key);
			node.ParentKey = "SFSSampleApp_Catalogs";
            nodes.Add(node);
            OnCreatingNodes(this, ref nodes);


			#region Address
            node = new DynamicNode();
            node.Title = AddressResources.ENTITY_PLURAL;
            node.Controller = "Addresses";
            node.Area = "SFSSampleApp";
            node.Action = "Index";
            node.Key = "SFSSampleApp_Address_List";
			node.ParentKey = "SFSSampleApp_Catalogs_Others";
 			node.Attributes.Add("moduleKey", "SFSSampleApp");
            node.Attributes.Add("businessObjectKey", "Address");
            node.Attributes.Add("permissionKey", "r");            
			nodes.Add(node);

			// Create
			node = new DynamicNode();
            node.Title = AddressResources.ADDRESSES_ADD_NEW;
            node.Controller = "Addresses";
            node.Area = "SFSSampleApp";
            node.Action = "CreateGen";
            node.Key = "SFSSampleApp_Address_Create";
			node.ParentKey = "SFSSampleApp_Address_List";
			node.Attributes.Add("visiblemenu", "false");
			
			
            nodes.Add(node);

			// Edit
			//node = new DynamicNode();
            //node.Title = AddressResources.ADDRESSES_EDIT;
            //node.Controller = "Addresses";
            //node.Area = "SFSSampleApp";
            //node.Action = "EditGen";
            //node.Key = "SFSSampleApp_Address_Edit";
			//node.ParentKey = "SFSSampleApp_Address_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			// Details
			//node = new DynamicNode();
            //node.Title = AddressResources.ADDRESSES_DETAILS;
            //node.Controller = "Addresses";
            //node.Area = "SFSSampleApp";
            //node.Action = "DetailsGen";
            //node.Key = "SFSSampleApp_Address_Details";
			//node.ParentKey = "SFSSampleApp_Address_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			#endregion
			#region Customer
            node = new DynamicNode();
            node.Title = CustomerResources.ENTITY_PLURAL;
            node.Controller = "Customers";
            node.Area = "SFSSampleApp";
            node.Action = "Index";
            node.Key = "SFSSampleApp_Customer_List";
			node.ParentKey = "SFSSampleApp_Catalogs_Others";
 			node.Attributes.Add("moduleKey", "SFSSampleApp");
            node.Attributes.Add("businessObjectKey", "Customer");
            node.Attributes.Add("permissionKey", "r");            
			nodes.Add(node);

			// Create
			node = new DynamicNode();
            node.Title = CustomerResources.CUSTOMERS_ADD_NEW;
            node.Controller = "Customers";
            node.Area = "SFSSampleApp";
            node.Action = "CreateGen";
            node.Key = "SFSSampleApp_Customer_Create";
			node.ParentKey = "SFSSampleApp_Customer_List";
			node.Attributes.Add("visiblemenu", "false");
			
			
            nodes.Add(node);

			// Edit
			//node = new DynamicNode();
            //node.Title = CustomerResources.CUSTOMERS_EDIT;
            //node.Controller = "Customers";
            //node.Area = "SFSSampleApp";
            //node.Action = "EditGen";
            //node.Key = "SFSSampleApp_Customer_Edit";
			//node.ParentKey = "SFSSampleApp_Customer_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			// Details
			//node = new DynamicNode();
            //node.Title = CustomerResources.CUSTOMERS_DETAILS;
            //node.Controller = "Customers";
            //node.Area = "SFSSampleApp";
            //node.Action = "DetailsGen";
            //node.Key = "SFSSampleApp_Customer_Details";
			//node.ParentKey = "SFSSampleApp_Customer_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			#endregion
			#region CustomerAddress
            node = new DynamicNode();
            node.Title = CustomerAddressResources.ENTITY_PLURAL;
            node.Controller = "CustomerAddresses";
            node.Area = "SFSSampleApp";
            node.Action = "Index";
            node.Key = "SFSSampleApp_CustomerAddress_List";
			node.ParentKey = "SFSSampleApp_Catalogs_Others";
 			node.Attributes.Add("moduleKey", "SFSSampleApp");
            node.Attributes.Add("businessObjectKey", "CustomerAddress");
            node.Attributes.Add("permissionKey", "r");            
			nodes.Add(node);

			// Create
			node = new DynamicNode();
            node.Title = CustomerAddressResources.CUSTOMERADDRESSES_ADD_NEW;
            node.Controller = "CustomerAddresses";
            node.Area = "SFSSampleApp";
            node.Action = "CreateGen";
            node.Key = "SFSSampleApp_CustomerAddress_Create";
			node.ParentKey = "SFSSampleApp_CustomerAddress_List";
			node.Attributes.Add("visiblemenu", "false");
			
			
            nodes.Add(node);

			// Edit
			//node = new DynamicNode();
            //node.Title = CustomerAddressResources.CUSTOMERADDRESSES_EDIT;
            //node.Controller = "CustomerAddresses";
            //node.Area = "SFSSampleApp";
            //node.Action = "EditGen";
            //node.Key = "SFSSampleApp_CustomerAddress_Edit";
			//node.ParentKey = "SFSSampleApp_CustomerAddress_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			// Details
			//node = new DynamicNode();
            //node.Title = CustomerAddressResources.CUSTOMERADDRESSES_DETAILS;
            //node.Controller = "CustomerAddresses";
            //node.Area = "SFSSampleApp";
            //node.Action = "DetailsGen";
            //node.Key = "SFSSampleApp_CustomerAddress_Details";
			//node.ParentKey = "SFSSampleApp_CustomerAddress_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			#endregion
			#region Product
            node = new DynamicNode();
            node.Title = ProductResources.ENTITY_PLURAL;
            node.Controller = "Products";
            node.Area = "SFSSampleApp";
            node.Action = "Index";
            node.Key = "SFSSampleApp_Product_List";
			node.ParentKey = "SFSSampleApp_Catalogs_Others";
 			node.Attributes.Add("moduleKey", "SFSSampleApp");
            node.Attributes.Add("businessObjectKey", "Product");
            node.Attributes.Add("permissionKey", "r");            
			nodes.Add(node);

			// Create
			node = new DynamicNode();
            node.Title = ProductResources.PRODUCTS_ADD_NEW;
            node.Controller = "Products";
            node.Area = "SFSSampleApp";
            node.Action = "CreateGen";
            node.Key = "SFSSampleApp_Product_Create";
			node.ParentKey = "SFSSampleApp_Product_List";
			node.Attributes.Add("visiblemenu", "false");
			
			
            nodes.Add(node);

			// Edit
			//node = new DynamicNode();
            //node.Title = ProductResources.PRODUCTS_EDIT;
            //node.Controller = "Products";
            //node.Area = "SFSSampleApp";
            //node.Action = "EditGen";
            //node.Key = "SFSSampleApp_Product_Edit";
			//node.ParentKey = "SFSSampleApp_Product_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			// Details
			//node = new DynamicNode();
            //node.Title = ProductResources.PRODUCTS_DETAILS;
            //node.Controller = "Products";
            //node.Area = "SFSSampleApp";
            //node.Action = "DetailsGen";
            //node.Key = "SFSSampleApp_Product_Details";
			//node.ParentKey = "SFSSampleApp_Product_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			#endregion
			#region ProductCategory
            node = new DynamicNode();
            node.Title = ProductCategoryResources.ENTITY_PLURAL;
            node.Controller = "ProductCategories";
            node.Area = "SFSSampleApp";
            node.Action = "Index";
            node.Key = "SFSSampleApp_ProductCategory_List";
			node.ParentKey = "SFSSampleApp_Catalogs_Others";
 			node.Attributes.Add("moduleKey", "SFSSampleApp");
            node.Attributes.Add("businessObjectKey", "ProductCategory");
            node.Attributes.Add("permissionKey", "r");            
			nodes.Add(node);

			// Create
			node = new DynamicNode();
            node.Title = ProductCategoryResources.PRODUCTCATEGORIES_ADD_NEW;
            node.Controller = "ProductCategories";
            node.Area = "SFSSampleApp";
            node.Action = "CreateGen";
            node.Key = "SFSSampleApp_ProductCategory_Create";
			node.ParentKey = "SFSSampleApp_ProductCategory_List";
			node.Attributes.Add("visiblemenu", "false");
			
			
            nodes.Add(node);

			// Edit
			//node = new DynamicNode();
            //node.Title = ProductCategoryResources.PRODUCTCATEGORIES_EDIT;
            //node.Controller = "ProductCategories";
            //node.Area = "SFSSampleApp";
            //node.Action = "EditGen";
            //node.Key = "SFSSampleApp_ProductCategory_Edit";
			//node.ParentKey = "SFSSampleApp_ProductCategory_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			// Details
			//node = new DynamicNode();
            //node.Title = ProductCategoryResources.PRODUCTCATEGORIES_DETAILS;
            //node.Controller = "ProductCategories";
            //node.Area = "SFSSampleApp";
            //node.Action = "DetailsGen";
            //node.Key = "SFSSampleApp_ProductCategory_Details";
			//node.ParentKey = "SFSSampleApp_ProductCategory_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			#endregion
			#region ProductDescription
            node = new DynamicNode();
            node.Title = ProductDescriptionResources.ENTITY_PLURAL;
            node.Controller = "ProductDescriptions";
            node.Area = "SFSSampleApp";
            node.Action = "Index";
            node.Key = "SFSSampleApp_ProductDescription_List";
			node.ParentKey = "SFSSampleApp_Catalogs_Others";
 			node.Attributes.Add("moduleKey", "SFSSampleApp");
            node.Attributes.Add("businessObjectKey", "ProductDescription");
            node.Attributes.Add("permissionKey", "r");            
			nodes.Add(node);

			// Create
			node = new DynamicNode();
            node.Title = ProductDescriptionResources.PRODUCTDESCRIPTIONS_ADD_NEW;
            node.Controller = "ProductDescriptions";
            node.Area = "SFSSampleApp";
            node.Action = "CreateGen";
            node.Key = "SFSSampleApp_ProductDescription_Create";
			node.ParentKey = "SFSSampleApp_ProductDescription_List";
			node.Attributes.Add("visiblemenu", "false");
			
			
            nodes.Add(node);

			// Edit
			//node = new DynamicNode();
            //node.Title = ProductDescriptionResources.PRODUCTDESCRIPTIONS_EDIT;
            //node.Controller = "ProductDescriptions";
            //node.Area = "SFSSampleApp";
            //node.Action = "EditGen";
            //node.Key = "SFSSampleApp_ProductDescription_Edit";
			//node.ParentKey = "SFSSampleApp_ProductDescription_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			// Details
			//node = new DynamicNode();
            //node.Title = ProductDescriptionResources.PRODUCTDESCRIPTIONS_DETAILS;
            //node.Controller = "ProductDescriptions";
            //node.Area = "SFSSampleApp";
            //node.Action = "DetailsGen";
            //node.Key = "SFSSampleApp_ProductDescription_Details";
			//node.ParentKey = "SFSSampleApp_ProductDescription_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			#endregion
			#region ProductModel
            node = new DynamicNode();
            node.Title = ProductModelResources.ENTITY_PLURAL;
            node.Controller = "ProductModels";
            node.Area = "SFSSampleApp";
            node.Action = "Index";
            node.Key = "SFSSampleApp_ProductModel_List";
			node.ParentKey = "SFSSampleApp_Catalogs_Others";
 			node.Attributes.Add("moduleKey", "SFSSampleApp");
            node.Attributes.Add("businessObjectKey", "ProductModel");
            node.Attributes.Add("permissionKey", "r");            
			nodes.Add(node);

			// Create
			node = new DynamicNode();
            node.Title = ProductModelResources.PRODUCTMODELS_ADD_NEW;
            node.Controller = "ProductModels";
            node.Area = "SFSSampleApp";
            node.Action = "CreateGen";
            node.Key = "SFSSampleApp_ProductModel_Create";
			node.ParentKey = "SFSSampleApp_ProductModel_List";
			node.Attributes.Add("visiblemenu", "false");
			
			
            nodes.Add(node);

			// Edit
			//node = new DynamicNode();
            //node.Title = ProductModelResources.PRODUCTMODELS_EDIT;
            //node.Controller = "ProductModels";
            //node.Area = "SFSSampleApp";
            //node.Action = "EditGen";
            //node.Key = "SFSSampleApp_ProductModel_Edit";
			//node.ParentKey = "SFSSampleApp_ProductModel_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			// Details
			//node = new DynamicNode();
            //node.Title = ProductModelResources.PRODUCTMODELS_DETAILS;
            //node.Controller = "ProductModels";
            //node.Area = "SFSSampleApp";
            //node.Action = "DetailsGen";
            //node.Key = "SFSSampleApp_ProductModel_Details";
			//node.ParentKey = "SFSSampleApp_ProductModel_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			#endregion
			#region ProductModelProductDescription
            node = new DynamicNode();
            node.Title = ProductModelProductDescriptionResources.ENTITY_PLURAL;
            node.Controller = "ProductModelProductDescriptions";
            node.Area = "SFSSampleApp";
            node.Action = "Index";
            node.Key = "SFSSampleApp_ProductModelProductDescription_List";
			node.ParentKey = "SFSSampleApp_Catalogs_Others";
 			node.Attributes.Add("moduleKey", "SFSSampleApp");
            node.Attributes.Add("businessObjectKey", "ProductModelProductDescription");
            node.Attributes.Add("permissionKey", "r");            
			nodes.Add(node);

			// Create
			node = new DynamicNode();
            node.Title = ProductModelProductDescriptionResources.PRODUCTMODELPRODUCTDESCRIPTIONS_ADD_NEW;
            node.Controller = "ProductModelProductDescriptions";
            node.Area = "SFSSampleApp";
            node.Action = "CreateGen";
            node.Key = "SFSSampleApp_ProductModelProductDescription_Create";
			node.ParentKey = "SFSSampleApp_ProductModelProductDescription_List";
			node.Attributes.Add("visiblemenu", "false");
			
			
            nodes.Add(node);

			// Edit
			//node = new DynamicNode();
            //node.Title = ProductModelProductDescriptionResources.PRODUCTMODELPRODUCTDESCRIPTIONS_EDIT;
            //node.Controller = "ProductModelProductDescriptions";
            //node.Area = "SFSSampleApp";
            //node.Action = "EditGen";
            //node.Key = "SFSSampleApp_ProductModelProductDescription_Edit";
			//node.ParentKey = "SFSSampleApp_ProductModelProductDescription_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			// Details
			//node = new DynamicNode();
            //node.Title = ProductModelProductDescriptionResources.PRODUCTMODELPRODUCTDESCRIPTIONS_DETAILS;
            //node.Controller = "ProductModelProductDescriptions";
            //node.Area = "SFSSampleApp";
            //node.Action = "DetailsGen";
            //node.Key = "SFSSampleApp_ProductModelProductDescription_Details";
			//node.ParentKey = "SFSSampleApp_ProductModelProductDescription_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			#endregion
			#region SalesOrderDetail
            node = new DynamicNode();
            node.Title = SalesOrderDetailResources.ENTITY_PLURAL;
            node.Controller = "SalesOrderDetails";
            node.Area = "SFSSampleApp";
            node.Action = "Index";
            node.Key = "SFSSampleApp_SalesOrderDetail_List";
			node.ParentKey = "SFSSampleApp_Catalogs_Others";
 			node.Attributes.Add("moduleKey", "SFSSampleApp");
            node.Attributes.Add("businessObjectKey", "SalesOrderDetail");
            node.Attributes.Add("permissionKey", "r");            
			nodes.Add(node);

			// Create
			node = new DynamicNode();
            node.Title = SalesOrderDetailResources.SALESORDERDETAILS_ADD_NEW;
            node.Controller = "SalesOrderDetails";
            node.Area = "SFSSampleApp";
            node.Action = "CreateGen";
            node.Key = "SFSSampleApp_SalesOrderDetail_Create";
			node.ParentKey = "SFSSampleApp_SalesOrderDetail_List";
			node.Attributes.Add("visiblemenu", "false");
			
			
            nodes.Add(node);

			// Edit
			//node = new DynamicNode();
            //node.Title = SalesOrderDetailResources.SALESORDERDETAILS_EDIT;
            //node.Controller = "SalesOrderDetails";
            //node.Area = "SFSSampleApp";
            //node.Action = "EditGen";
            //node.Key = "SFSSampleApp_SalesOrderDetail_Edit";
			//node.ParentKey = "SFSSampleApp_SalesOrderDetail_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			// Details
			//node = new DynamicNode();
            //node.Title = SalesOrderDetailResources.SALESORDERDETAILS_DETAILS;
            //node.Controller = "SalesOrderDetails";
            //node.Area = "SFSSampleApp";
            //node.Action = "DetailsGen";
            //node.Key = "SFSSampleApp_SalesOrderDetail_Details";
			//node.ParentKey = "SFSSampleApp_SalesOrderDetail_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			#endregion
			#region SalesOrderHeader
            node = new DynamicNode();
            node.Title = SalesOrderHeaderResources.ENTITY_PLURAL;
            node.Controller = "SalesOrderHeaders";
            node.Area = "SFSSampleApp";
            node.Action = "Index";
            node.Key = "SFSSampleApp_SalesOrderHeader_List";
			node.ParentKey = "SFSSampleApp_Catalogs_Others";
 			node.Attributes.Add("moduleKey", "SFSSampleApp");
            node.Attributes.Add("businessObjectKey", "SalesOrderHeader");
            node.Attributes.Add("permissionKey", "r");            
			nodes.Add(node);

			// Create
			node = new DynamicNode();
            node.Title = SalesOrderHeaderResources.SALESORDERHEADERS_ADD_NEW;
            node.Controller = "SalesOrderHeaders";
            node.Area = "SFSSampleApp";
            node.Action = "CreateGen";
            node.Key = "SFSSampleApp_SalesOrderHeader_Create";
			node.ParentKey = "SFSSampleApp_SalesOrderHeader_List";
			node.Attributes.Add("visiblemenu", "false");
			
			
            nodes.Add(node);

			// Edit
			//node = new DynamicNode();
            //node.Title = SalesOrderHeaderResources.SALESORDERHEADERS_EDIT;
            //node.Controller = "SalesOrderHeaders";
            //node.Area = "SFSSampleApp";
            //node.Action = "EditGen";
            //node.Key = "SFSSampleApp_SalesOrderHeader_Edit";
			//node.ParentKey = "SFSSampleApp_SalesOrderHeader_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			// Details
			//node = new DynamicNode();
            //node.Title = SalesOrderHeaderResources.SALESORDERHEADERS_DETAILS;
            //node.Controller = "SalesOrderHeaders";
            //node.Area = "SFSSampleApp";
            //node.Action = "DetailsGen";
            //node.Key = "SFSSampleApp_SalesOrderHeader_Details";
			//node.ParentKey = "SFSSampleApp_SalesOrderHeader_List";
			//node.Attributes.Add("visible", "false");
			//node.Attributes.Add("dynamicParameters", "id");
			//node.Attributes.Add("isDynamic", "true");
            //nodes.Add(node);

			#endregion

 			OnCreatedNodes(this, ref nodes);
			//nodes = nodes.OrderBy(p => p.Title).ToList();
            return nodes;
        }
    }
}
